import service from "@/utils/request"

import LoginWork from "@/utils/LoginWork"

// 待汇总指令查询
export const QueryToBeSummarized = (parms:any) => {
    return service.post<any,any>(`/SummaryOperation/getNotSummaryLotNoList`,parms)
}

// 汇总号查询
export const SummaryInvoiceQuery = (parms:any) => {
    return service.post<any,any>(`/SummaryOperation/getSummaryNumberList`,parms)
}

// 汇总材料查询
export const materialsQuerry = (parms:any) => {
    // const parms = {sumNo,lotNo}
    return service.post<any,any>(`/SummaryOperation/getSummaryMaterialList`,parms)
}

// 汇总指令查询
export const QyeryLotNo = (sumNo:any,lotNo:string) => {
    const parms = {sumNo,lotNo}
    return service.post<any,any>(`/SummaryOperation/getSummaryLotNoList`,parms)
}

// 贴合子材料查询
export const FitSubMaterialQuery = (sumNo:string,mtlNo:string,lotNo:string) => {
    const parms = {sumNo,mtlNo,lotNo}
    return service.post<any,any>(`/SummaryOperation/getBondingSubmaterial`,parms)
}

export const FitSubMaterialQueryList = (sumNo:string,mtlNo:string,lotNo:string) => {
    const parms = {sumNo,mtlNo,lotNo}
    return service.post<any,any>(`/SummaryOperation/getSummaryDetailList`,parms)
}



// 不汇总指令删除
export const deleteLotNoList = (lotNo:string) => {
    return LoginWork.post<any,any>(`/SummaryOperation/deleteNotSummaryLotNo?lotNo=${lotNo}`)
}

// 删除指令查询
export const QueryLotNoList = () => {
    return service.get<any,any>(`/SummaryOperation/getDeleteLotNoList`)
}

// 恢复指令
export const recoveryCommand = (lotNo:string) => {
    return LoginWork.post<any,any>(`/SummaryOperation/recoverLotNo?lotNo=${lotNo}`)
}

// 汇总删除
export const deleteSumm = (sumNo:string) => {
    return LoginWork.post<any,any>(`/SummaryOperation/deleteSummaryLotNo?sumNo=${sumNo}`)
}

// 汇总作业
export const SummaryOperation = (parms:any) => {
    return LoginWork.post<any,any>(`/SummaryOperation/summaryOperationBatch`,parms)
}

// 清洗数据
export const clearDate = (lotNo:string) => {
    return LoginWork.get<any,any>(`/SummaryOperation/cleanNoSummaryData?lotNo=${lotNo}`)
}